<?php
//     echo '<pre>', print_r($this->module->id, true), '</pre>';die();
 ?>
<?php $assetsUrl = $this->module->assetsUrl; ?>
<?php $topNestedModule = $this->module; while (!is_null($topNestedModule->parentModule)) $topNestedModule = $topNestedModule->parentModule; ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />
    <script src="<?php echo $assetsUrl; ?>/scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
	<link type="text/css" href="<?php echo $topNestedModule->assetsUrl; ?>/css/hq.css" rel="stylesheet">
	<link type="text/css" href="<?php echo $topNestedModule->assetsUrl; ?>/css/form.css" rel="stylesheet">
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>


<body class="layout">
	<?php $msg =  Yii::app()->user->hasFlash('action') ? Yii::app()->user->getFlash('action') : null ?>

	<div class="msg-wrapper"<?php if (empty($msg)): ?> style="display: none;"<?php endif; ?>>
		<div class="msg">
			<?php if (!empty($msg)) echo $msg; ?>
		</div>
	</div>

	<script language="JavaScript">
	<!--
	jQuery(function($) {
		ActMsg = {
			showMessage: function(msg) {
				$('.msg-wrapper').fadeOut('fast', function() {
					$(this).find('.msg').html(msg);
					// $(this).fadeIn().delay(5000).fadeOut();
					$(this).fadeIn();
				});
			}
		}
	})
	//-->
	</script>

	<div class="hq-header">
		<div class="hq-header-inner">
            <iframe src="<?php echo $this->createUrl('/' . $topNestedModule->id . '/default/header', array('nodbtoolbar'=>'')); ?>"></iframe>
			<b class="logout"><a href="<?php echo $this->createUrl('/user/logout'); ?>"><?php echo Yii::t('strings','Sign out');?></a></b>
		</div>

	</div>
	<table class="layout">
		<tr>
			<td class="hq-nagivator">
				<div class="hq-nagivator-inner">
                <iframe src="<?php echo $this->createUrl('/' . $topNestedModule->id . '/default/nav', array('nodbtoolbar'=>'3')); ?>"></iframe> 
				</div>
			</td>
			<td class="hq-content">
				<?php echo $content; ?>
			</td>
		</tr>
	</table>
</body>
</body>
</html>